<?php
	// Check crossing acess
	if (!defined('RIGHT_ACCESS') || !defined('ROOT_FOLDER'))
	{
		header('Content-Type: text/xml; charset=utf-8');
		echo '<?xml version="1.0"?>';
		echo '<atomtask>';
		echo '<request>error.request.invalid</request>';
		echo '</atomtask>';
		return;
	}	

	// Include functions
	include_once(ROOT_FOLDER.'api/auth.php');
	include_once(ROOT_FOLDER.'db/connect_db.php');

	if (!isset($valid_auth) || !$valid_auth)
		return;

	if (!$auth->delete_token())
		XML::write_element('result', 'error.request.unknown');
	else
		XML::write_element('result', 'success.user.logout ');
?>